﻿<UserControl x:Class="Kokomo.Environment.Documents.TabbedDetailView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:env="clr-namespace:Kokomo.Environment;assembly=Kokomo.Environment"
			 xmlns:doc="clr-namespace:Kokomo.Environment.Documents"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<Grid>
		<TabControl
			ItemsSource="{Binding Tabs}"
			SelectedItem="{Binding SelectedTab}"
			>
			<TabControl.ItemTemplate>
				<DataTemplate DataType="{x:Type doc:TabPageViewModel}">
					<StackPanel Orientation="Horizontal">
						<Image Source="{Binding IconSource}" MaxWidth="16" MaxHeight="16"/>
						<TextBlock Text="{Binding Heading}"/>
					</StackPanel>
				</DataTemplate>
			</TabControl.ItemTemplate>
			<TabControl.ContentTemplate>
				<DataTemplate DataType="{x:Type doc:TabPageViewModel}">
					<ContentPresenter
						Content="{Binding Content}"
						ContentTemplateSelector="{x:Static env:AttributedViewTemplateSelector.Default}"
						/>
				</DataTemplate>
			</TabControl.ContentTemplate>
		</TabControl>
	</Grid>
</UserControl>
